About the Code Derived Column Demo

This demo demonstrates how Columns in the bindinglist of an ElementHandle can be derived using code rather than an OCL expression. It also shows how a column can be resverse derived.

The model consists of a single class Product, with a single attribute Name.

ExpressionHandle1, which is shown in the grid, contains two derived columns in addition to the Namecolumn. Reversed, which shows Namebackwards and IsPalindrome, which a a derived boolean attribute that is true if Nameis a palindrome.

Note that all derivations for an ElementHandle use the same event handler, so the actual code needs to switch on the name of the column.

Setup Information

No setup is needed.

Running the Demo

This section should list the steps necessary for the user to get the demo loading into the IDE and running.
  1. Run the program
  2. Press "Create test data"
  3. Change the value in the Namecolumn on one of the items from a "radar" to "plane" and note that IsPalindromebecomes unchecked
  4. Change the value in the Reversedcolumn on one of the items to "elcycib" and note the effect of the reverse derivation of this column